/**
 * Created by Administrator on 2019/2/24.
 */
$(function () {
    $.extend($.messager.defaults,{
        ok:"确定",
        cancel:"取消"
    });

    var content0 = "<li onclick =\"goToPanel('sh-tabs','/notice/manager','公告管理','menu_noticeManager')\"><a href=\"javascript:void(0)\" id=\"menu_noticeManager"
        + "\" ondragstart=\"return false\" style='text-align: left;height: 35px;'"
        + "\">公告管理</a></li>";
    var content0 = "<ul class='m-list' style='height: 40px;'>" + content0 + "</ul>";
    addPanel("sh-accordion", "系统管理", "icon-lock",content0);
    var content1 = "<li onclick =\"goToPanel('sh-tabs','/user/queryUser/mobile','查询用户','menu3')\"><a  href=\"javascript:void(0)\" id=\"menu3"
        + "\" ondragstart=\"return false\" style='text-align: left;height: 35px;'"
        + "\">查询用户</a></li>";
    var content1 = "<ul class='m-list' style='height: 40px;'>" + content1 + "</ul>";
    addPanel("sh-accordion", "用户管理", "icon-man", content1);
    var content = "<li onclick =\"goToPanel('sh-tabs','/addMould/mobile','添加模具','menu1')\" style='text-align: left'><a  href=\"javascript:void(0)\" id=\"menu1"
        + "\" ondragstart=\"return false\" style='text-align: left;height: 35px;'"
        + "\">添加模具</a></li>";
    content += "<li onclick =\"goToPanel('sh-tabs','/queryMould/mobile','查询模具','menu2')\" style='text-align: left'><a  href=\"javascript:void(0)\" id=\"menu2"
        + "\" ondragstart=\"return false\" style='text-align: left;height: 35px;'"
        + "\">查询模具</a></li>";
    var content = "<ul class='m-list' style='height: 60px;'>" + content + "</ul>";
    addPanel("sh-accordion", "模具管理", "icon-sum", content);
    selectPanel("sh-accordion","模具管理");
    console.log(document.body.clientHeight);
    console.log(document.documentElement.clientHeight);
    $(".accordion-body").css({"height":"320px","border":"none"});
    backBtnClick();// 点击返回按钮
});

function goToPanel(id, url, title,cssid) {
    $.mobile.go('#p2');
    createTabs(id, url, title,cssid);
}

function backBtnClick() {
    $("#backBtn").click(function () {
        console.log("aaa");
        $(".accordion-body").css({"height":"320px","border":"none"});
    });

}